﻿Public Class clsShipment
    Inherits clsBLBase

    ''' <summary>
    ''' Constructor truyền connection string vào BL
    ''' </summary>
    ''' <param name="connectionString">connection string muốn truyền xuống BL</param>
    ''' <remarks>Nguyễn Huy Thường added on 08/07/2012</remarks>
    Public Sub New(ByVal connectionString As String)
        MyBase.New(connectionString)
    End Sub

#Region "Overrides"

    ''' <summary>
    ''' Đặt tên cho bảng hiện đang làm việc là Shipment
    ''' </summary>
    ''' <remarks>Nguyễn Huy Thường added on 08/06/2011</remarks>
    Protected Overrides Sub SetTableName()
        MyBase.TableName = dsFMS.Shipment.TableName
    End Sub

    ''' <summary>
    ''' Sub tạo mới một bản ghi trống trên dataset
    ''' </summary>
    ''' <returns>Trả lại một bản ghi trống</returns>
    ''' <remarks>Nguyễn Huy Thường added on 24/10/2010</remarks>
    Public Overrides Function InitNewRow() As System.Data.DataRow
        Dim drNewRow As FMSDataSet.ShipmentRow = dsFMS.Shipment.NewShipmentRow
        With drNewRow
            .ShipmentID = Guid.NewGuid
            .PartnerID = Nothing
            .RepresentativeID = Nothing
            .ShipmentReceiveEmp = Nothing
            .ShipmentImportEmp = Nothing
            .ShipmentAlias = String.Empty
            .ShipmentNumber = String.Empty
            .ShipmentTax = Nothing
            .ShipmentPurchaseDate = Today
            .ShipmentAddedDate = Today
            .SetShipmentDeletedDateNull()
            .ShipmentStatus = True
            .SetShipmentDescriptionNull()
        End With
        dsFMS.Shipment.Rows.Add(drNewRow)
        Return drNewRow
    End Function
#End Region
End Class
